package com.d2rv.guide;

import com.d2rv.model.InstructionModel;
import com.d2rv.offscreen.OffScreen3D;

/**
 * This class extends Instruction and draws turn back arrow instruction used by 
 * the guide for the collaboration.
 * @author Darrieutort A., Dupouy A., Rossignol L., Van Poucke A.
 */
public class InstructionArrowTurnBack extends Instruction {

    /**
     * Default constructor.
     *
     * @param instructionmodel reference to a model to draw
     */
    public InstructionArrowTurnBack(InstructionModel instructionmodel) {
        super(instructionmodel);
    }

    /**
     * Draws the current arrow instruction model.
     *
     * @param parent the current offscreen
     */
    public void draw(OffScreen3D parent) {
        parent.pushMatrix();
        parent.translate(this.instructionmodel.position().x, this.instructionmodel.position().y, this.instructionmodel.position().z);
        this.instructionmodel.draw(parent);
        parent.popMatrix();
    }
}